package ThisPractise02;

public class Bank {
    private Customer[] customers;
    private int numOfCustomer;
    public Bank(){
        customers=new Customer[10];
    }
    /*添加用户*/
    public void addCustomer(String firstName,String lastName){
        Customer c1=new Customer(firstName,lastName);
        customers[numOfCustomer]=c1;
        numOfCustomer++;
    }

    public int getNumOfCustomer(){
        return numOfCustomer;
    }
    public Customer getCustomers(int index){
        if(index<0||index>=numOfCustomer){
            return null;
        }else
            return customers[index];
    }
}
